package com.realone.packman.codec.encoder;

import com.realone.packman.codec.encoder.vo.BmsEncoderDataVo01;

import java.nio.ByteBuffer;

/**
 *
 * 获取BMS电压 编码
 * @author hugx
 * @create 2018-09-12 14:39
 */
public class BmsEncoder01 extends BmsEncoder<BmsEncoderDataVo01> {

    @Override
    protected byte[] encoderData(BmsEncoderDataVo01 bmsEncoderDataVo01) {
        ByteBuffer bb = ByteBuffer.allocate(1);
        bb.put(bmsEncoderDataVo01.getCellNum());
        return bb.array();
    }
}
